/*
 * Copyright (c) 2017年11月01日  by XuanWu Wireless Technology Co., Ltd 
 *             All rights reserved  
 */
package com.zml.service.impl;

/**
 * @author <a href="mailto:zhaominglin@wxchina.com">minglin.Zhao</a>
 * @Description
 * @Date 2017/11/1
 * @Version 1.0.0
 */
public class SendResult {
    private String callId;
    private boolean result;

    public String getCallId() {
        return callId;
    }

    public void setCallId(String callId) {
        this.callId = callId;
    }

    public boolean getResult() {
        return result;
    }

    public void setResult(boolean result) {
        this.result = result;
    }

    public static SendResult buildSuccess(String callId) {
        SendResult r = new SendResult();
        r.setResult(Boolean.TRUE);
        r.setCallId(callId);
        return r;
    }

    public static SendResult buildSuccess() {
        SendResult r = new SendResult();
        r.setResult(Boolean.TRUE);
        r.setCallId(null);
        return r;
    }

    public static SendResult buildFailre(String callId) {
        SendResult r = new SendResult();
        r.setResult(Boolean.FALSE);
        r.setCallId(callId);
        return r;
    }

    public static SendResult buildFailre() {
        SendResult r = new SendResult();
        r.setResult(Boolean.FALSE);
        r.setCallId(null);
        return r;
    }
}
